/*
RNAvigator is a tool for visualizing secondary structure of RNA
Copyright 2012 Elias La Cour & Peter Bertelsen

This file is part of RNAvigator.

RNAvigator is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

RNAvigator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with RNAvigator.  If not, see <http://www.gnu.org/licenses/>.
*/

package rnavigator.controller;

import java.awt.Point;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import rnavigator.model.Model;
import rnavigator.view.GUI;

/**
 *
 * @author Elias la Cour & Peter Bertelsen
 */
public class Controller {

    private boolean debug = false;
    private Model model = null;
    private GUI gui = null;

    public void mousewheelMoved(MouseWheelEvent e) {
        gui.getStructureCanvas().mouseZoom(e);
    }

    public void mousePressed(MouseEvent evt) {
        gui.getStructureCanvas().mousePressed(evt);

    }

    public void mouseReleased(MouseEvent evt) {
        gui.getStructureCanvas().mouseReleased(evt);
    }

    public void mouseDragged(MouseEvent evt) {
        gui.getStructureCanvas().mouseDragged(evt);
    }
    public void mouseClicked(MouseEvent evt) {
        int count = evt.getClickCount();
        if(count == 2){
            gui.getStructureCanvas().resetScreen();
        }
    }
    

    /**
     * @return the model
     */
    public Model getModel() {
        return model;
    }

    /**
     * @param model the model to set
     */
    public void setModel(Model model) {
        this.model = model;
    }

    /**
     * @return the gui
     */
    public GUI getGui() {
        return gui;
    }

    /**
     * @param gui the gui to set
     */
    public void setGui(GUI gui) {
        this.gui = gui;
    }
}
